3.1.6 \(\int \frac {a+b \tanh ^{-1}(c x)}{(d+e x)^2} \, dx\) [6]

Optimal. Leaf size=93 \[ -\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (1+c x)}{2 (c d-e) e}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \]

[Out]

(-a-b*arctanh(c*x))/e/(e*x+d)-1/2*b*c*ln(-c*x+1)/e/(c*d+e)+1/2*b*c*ln(c*x+1)/(c*d-e)/e-b*c*ln(e*x+d)/(c^2*d^2-
e^2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6063, 720, 31, 647} \begin {gather*} -\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (c x+1)}{2 e (c d-e)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])/(d + e*x)^2,x]

[Out]

-((a + b*ArcTanh[c*x])/(e*(d + e*x))) - (b*c*Log[1 - c*x])/(2*e*(c*d + e)) + (b*c*Log[1 + c*x])/(2*(c*d - e)*e
) - (b*c*Log[d + e*x])/(c^2*d^2 - e^2)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 720

Int[1/(((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 + a*e^2), Int[1/(d + e*x), x],
 x] + Dist[1/(c*d^2 + a*e^2), Int[(c*d - c*e*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a
*e^2, 0]

Rule 6063

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcTanh[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{(d+e x)^2} \, dx &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}+\frac {(b c) \int \frac {1}{(d+e x) \left (1-c^2 x^2\right )} \, dx}{e}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {(b c) \int \frac {-c^2 d+c^2 e x}{1-c^2 x^2} \, dx}{e \left (c^2 d^2-e^2\right )}-\frac {(b c e) \int \frac {1}{d+e x} \, dx}{c^2 d^2-e^2}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}-\frac {\left (b c^3\right ) \int \frac {1}{-c-c^2 x} \, dx}{2 (c d-e) e}+\frac {\left (b c^3\right ) \int \frac {1}{c-c^2 x} \, dx}{2 e (c d+e)}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (1+c x)}{2 (c d-e) e}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 102, normalized size = 1.10 \begin {gather*} -\frac {a}{e (d+e x)}-\frac {b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}-\frac {b c \log (1+c x)}{2 e (-c d+e)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])/(d + e*x)^2,x]

[Out]

-(a/(e*(d + e*x))) - (b*ArcTanh[c*x])/(e*(d + e*x)) - (b*c*Log[1 - c*x])/(2*e*(c*d + e)) - (b*c*Log[1 + c*x])/
(2*e*(-(c*d) + e)) - (b*c*Log[d + e*x])/(c^2*d^2 - e^2)

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 128, normalized size = 1.38

method result size
derivativedivides \(\frac {-\frac {a \,c^{2}}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \arctanh \left (c x \right )}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \ln \left (c x -1\right )}{e \left (2 d c +2 e \right )}+\frac {b \,c^{2} \ln \left (c x +1\right )}{e \left (2 d c -2 e \right )}-\frac {b \,c^{2} \ln \left (c e x +d c \right )}{\left (d c +e \right ) \left (d c -e \right )}}{c}\) \(128\)
default \(\frac {-\frac {a \,c^{2}}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \arctanh \left (c x \right )}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \ln \left (c x -1\right )}{e \left (2 d c +2 e \right )}+\frac {b \,c^{2} \ln \left (c x +1\right )}{e \left (2 d c -2 e \right )}-\frac {b \,c^{2} \ln \left (c e x +d c \right )}{\left (d c +e \right ) \left (d c -e \right )}}{c}\) \(128\)
risch \(-\frac {b \ln \left (c x +1\right )}{2 e \left (e x +d \right )}-\frac {\ln \left (c x -1\right ) b \,c^{2} d e x -\ln \left (-c x -1\right ) b \,c^{2} d e x +2 \ln \left (-e x -d \right ) b c \,e^{2} x +\ln \left (c x -1\right ) b \,c^{2} d^{2}-\ln \left (c x -1\right ) b c \,e^{2} x -\ln \left (-c x -1\right ) b \,c^{2} d^{2}-\ln \left (-c x -1\right ) b c \,e^{2} x -b \,c^{2} d^{2} \ln \left (-c x +1\right )+2 \ln \left (-e x -d \right ) b c d e -\ln \left (c x -1\right ) b c d e -\ln \left (-c x -1\right ) b c d e +2 a \,c^{2} d^{2}+b \,e^{2} \ln \left (-c x +1\right )-2 a \,e^{2}}{2 \left (d c -e \right ) \left (d c +e \right ) \left (e x +d \right ) e}\) \(239\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))/(e*x+d)^2,x,method=_RETURNVERBOSE)

[Out]

1/c*(-a*c^2/(c*e*x+c*d)/e-b*c^2/(c*e*x+c*d)/e*arctanh(c*x)-b*c^2/e/(2*c*d+2*e)*ln(c*x-1)+b*c^2/e/(2*c*d-2*e)*l
n(c*x+1)-b*c^2/(c*d+e)/(c*d-e)*ln(c*e*x+c*d))

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 99, normalized size = 1.06 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {\log \left (c x + 1\right )}{c d e - e^{2}} - \frac {\log \left (c x - 1\right )}{c d e + e^{2}} - \frac {2 \, \log \left (x e + d\right )}{c^{2} d^{2} - e^{2}}\right )} - \frac {2 \, \operatorname {artanh}\left (c x\right )}{x e^{2} + d e}\right )} b - \frac {a}{x e^{2} + d e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(e*x+d)^2,x, algorithm="maxima")

[Out]

1/2*(c*(log(c*x + 1)/(c*d*e - e^2) - log(c*x - 1)/(c*d*e + e^2) - 2*log(x*e + d)/(c^2*d^2 - e^2)) - 2*arctanh(
c*x)/(x*e^2 + d*e))*b - a/(x*e^2 + d*e)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 393 vs. \(2 (89) = 178\).
time = 0.47, size = 393, normalized size = 4.23 \begin {gather*} -\frac {2 \, a c^{2} d^{2} - 2 \, a \cosh \left (1\right )^{2} - 4 \, a \cosh \left (1\right ) \sinh \left (1\right ) - 2 \, a \sinh \left (1\right )^{2} - {\left (b c^{2} d^{2} + b c x \cosh \left (1\right )^{2} + b c x \sinh \left (1\right )^{2} + {\left (b c^{2} d x + b c d\right )} \cosh \left (1\right ) + {\left (b c^{2} d x + 2 \, b c x \cosh \left (1\right ) + b c d\right )} \sinh \left (1\right )\right )} \log \left (c x + 1\right ) + {\left (b c^{2} d^{2} - b c x \cosh \left (1\right )^{2} - b c x \sinh \left (1\right )^{2} + {\left (b c^{2} d x - b c d\right )} \cosh \left (1\right ) + {\left (b c^{2} d x - 2 \, b c x \cosh \left (1\right ) - b c d\right )} \sinh \left (1\right )\right )} \log \left (c x - 1\right ) + 2 \, {\left (b c x \cosh \left (1\right )^{2} + b c x \sinh \left (1\right )^{2} + b c d \cosh \left (1\right ) + {\left (2 \, b c x \cosh \left (1\right ) + b c d\right )} \sinh \left (1\right )\right )} \log \left (x \cosh \left (1\right ) + x \sinh \left (1\right ) + d\right ) + {\left (b c^{2} d^{2} - b \cosh \left (1\right )^{2} - 2 \, b \cosh \left (1\right ) \sinh \left (1\right ) - b \sinh \left (1\right )^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{2 \, {\left (c^{2} d^{2} x \cosh \left (1\right )^{2} + c^{2} d^{3} \cosh \left (1\right ) - x \cosh \left (1\right )^{4} - x \sinh \left (1\right )^{4} - d \cosh \left (1\right )^{3} - {\left (4 \, x \cosh \left (1\right ) + d\right )} \sinh \left (1\right )^{3} + {\left (c^{2} d^{2} x - 6 \, x \cosh \left (1\right )^{2} - 3 \, d \cosh \left (1\right )\right )} \sinh \left (1\right )^{2} + {\left (2 \, c^{2} d^{2} x \cosh \left (1\right ) + c^{2} d^{3} - 4 \, x \cosh \left (1\right )^{3} - 3 \, d \cosh \left (1\right )^{2}\right )} \sinh \left (1\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(e*x+d)^2,x, algorithm="fricas")

[Out]

-1/2*(2*a*c^2*d^2 - 2*a*cosh(1)^2 - 4*a*cosh(1)*sinh(1) - 2*a*sinh(1)^2 - (b*c^2*d^2 + b*c*x*cosh(1)^2 + b*c*x
*sinh(1)^2 + (b*c^2*d*x + b*c*d)*cosh(1) + (b*c^2*d*x + 2*b*c*x*cosh(1) + b*c*d)*sinh(1))*log(c*x + 1) + (b*c^
2*d^2 - b*c*x*cosh(1)^2 - b*c*x*sinh(1)^2 + (b*c^2*d*x - b*c*d)*cosh(1) + (b*c^2*d*x - 2*b*c*x*cosh(1) - b*c*d
)*sinh(1))*log(c*x - 1) + 2*(b*c*x*cosh(1)^2 + b*c*x*sinh(1)^2 + b*c*d*cosh(1) + (2*b*c*x*cosh(1) + b*c*d)*sin
h(1))*log(x*cosh(1) + x*sinh(1) + d) + (b*c^2*d^2 - b*cosh(1)^2 - 2*b*cosh(1)*sinh(1) - b*sinh(1)^2)*log(-(c*x
 + 1)/(c*x - 1)))/(c^2*d^2*x*cosh(1)^2 + c^2*d^3*cosh(1) - x*cosh(1)^4 - x*sinh(1)^4 - d*cosh(1)^3 - (4*x*cosh
(1) + d)*sinh(1)^3 + (c^2*d^2*x - 6*x*cosh(1)^2 - 3*d*cosh(1))*sinh(1)^2 + (2*c^2*d^2*x*cosh(1) + c^2*d^3 - 4*
x*cosh(1)^3 - 3*d*cosh(1)^2)*sinh(1))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 690 vs. \(2 (73) = 146\).
time = 1.27, size = 690, normalized size = 7.42 \begin {gather*} \begin {cases} - \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} + \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} + \frac {b d}{2 d^{2} e + 2 d e^{2} x} - \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = - \frac {e}{d} \\- \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} - \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} - \frac {b d}{2 d^{2} e + 2 d e^{2} x} + \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = \frac {e}{d} \\\tilde {\infty } \left (a x + b x \operatorname {atanh}{\left (c x \right )} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b \operatorname {atanh}{\left (c x \right )}}{c}\right ) & \text {for}\: d = - e x \\\frac {a x + b x \operatorname {atanh}{\left (c x \right )} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b \operatorname {atanh}{\left (c x \right )}}{c}}{d^{2}} & \text {for}\: e = 0 \\- \frac {a}{d e + e^{2} x} & \text {for}\: c = 0 \\- \frac {a c^{2} d^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {a e^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c^{2} d e x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c d e \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c e^{2} x \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b e^{2} \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))/(e*x+d)**2,x)

[Out]

Piecewise((-2*a*d/(2*d**2*e + 2*d*e**2*x) + b*d*atanh(e*x/d)/(2*d**2*e + 2*d*e**2*x) + b*d/(2*d**2*e + 2*d*e**
2*x) - b*e*x*atanh(e*x/d)/(2*d**2*e + 2*d*e**2*x), Eq(c, -e/d)), (-2*a*d/(2*d**2*e + 2*d*e**2*x) - b*d*atanh(e
*x/d)/(2*d**2*e + 2*d*e**2*x) - b*d/(2*d**2*e + 2*d*e**2*x) + b*e*x*atanh(e*x/d)/(2*d**2*e + 2*d*e**2*x), Eq(c
, e/d)), (zoo*(a*x + b*x*atanh(c*x) + b*log(x - 1/c)/c + b*atanh(c*x)/c), Eq(d, -e*x)), ((a*x + b*x*atanh(c*x)
 + b*log(x - 1/c)/c + b*atanh(c*x)/c)/d**2, Eq(e, 0)), (-a/(d*e + e**2*x), Eq(c, 0)), (-a*c**2*d**2/(c**2*d**3
*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + a*e**2/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + b*c**2*
d*e*x*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + b*c*d*e*log(x - 1/c)/(c**2*d**3*e + c**2
*d**2*e**2*x - d*e**3 - e**4*x) - b*c*d*e*log(d/e + x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + b*
c*d*e*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + b*c*e**2*x*log(x - 1/c)/(c**2*d**3*e + c
**2*d**2*e**2*x - d*e**3 - e**4*x) - b*c*e**2*x*log(d/e + x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x
) + b*c*e**2*x*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e**3 - e**4*x) + b*e**2*atanh(c*x)/(c**2*d**3*e
+ c**2*d**2*e**2*x - d*e**3 - e**4*x), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 243 vs. \(2 (89) = 178\).
time = 0.41, size = 243, normalized size = 2.61 \begin {gather*} -c {\left (\frac {b \log \left (\frac {{\left (c x + 1\right )} c d}{c x - 1} - c d + \frac {{\left (c x + 1\right )} e}{c x - 1} + e\right )}{c^{2} d^{2} - e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2} d^{2} - e^{2}} - \frac {2 \, a}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(e*x+d)^2,x, algorithm="giac")

[Out]

-c*(b*log((c*x + 1)*c*d/(c*x - 1) - c*d + (c*x + 1)*e/(c*x - 1) + e)/(c^2*d^2 - e^2) - b*log(-(c*x + 1)/(c*x -
 1))/((c*x + 1)*c^2*d^2/(c*x - 1) - c^2*d^2 + 2*(c*x + 1)*c*d*e/(c*x - 1) + (c*x + 1)*e^2/(c*x - 1) + e^2) - b
*log(-(c*x + 1)/(c*x - 1))/(c^2*d^2 - e^2) - 2*a/((c*x + 1)*c^2*d^2/(c*x - 1) - c^2*d^2 + 2*(c*x + 1)*c*d*e/(c
*x - 1) + (c*x + 1)*e^2/(c*x - 1) + e^2))

________________________________________________________________________________________

Mupad [B]
time = 3.60, size = 115, normalized size = 1.24 \begin {gather*} -\frac {d^2\,\left (\frac {b\,c\,\ln \left (c^2\,x^2-1\right )}{2}-b\,c\,\ln \left (d+e\,x\right )+a\,c^2\,x+b\,c^2\,x\,\mathrm {atanh}\left (c\,x\right )\right )+d\,e\,\left (b\,\mathrm {atanh}\left (c\,x\right )-b\,c\,x\,\ln \left (d+e\,x\right )+\frac {b\,c\,x\,\ln \left (c^2\,x^2-1\right )}{2}\right )-a\,e^2\,x}{d\,\left (e^2-c^2\,d^2\right )\,\left (d+e\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))/(d + e*x)^2,x)

[Out]

-(d^2*((b*c*log(c^2*x^2 - 1))/2 - b*c*log(d + e*x) + a*c^2*x + b*c^2*x*atanh(c*x)) + d*e*(b*atanh(c*x) - b*c*x
*log(d + e*x) + (b*c*x*log(c^2*x^2 - 1))/2) - a*e^2*x)/(d*(e^2 - c^2*d^2)*(d + e*x))

________________________________________________________________________________________